package day04.work01;

public class Rectangle extends Shape{
    private double r;
    private double h;

    public Rectangle(){}
    public Rectangle(String color,double r,double h){
        super(color);
        this.h=h;
        this.r=r;
    }

    @Override
    public double area() {
        return Math.PI*r*2*(r+h);
    }
    
}
